package com.example.arithmeticleetcode.leetcode.october;

/**
 * @program: arithmetic-leetcode
 * @description:
 * @author: FangZhen
 * @create: 2020-11-03 10:14
 **/
public class Demo22 {

    public static void main(String[] args) {
        countVowelStrings(4);
    }

    public static int countVowelStrings(int n) {
        if(n == 1) return 5;
        int[] arr = new int[6];
        arr[5] = 1;
        for(int i = 2 ; i <= n ;i++){
            for(int k = 4 ; k >= 1 ;k--){
                arr[k] += arr[k+1];
            }
        }
        int sum = 0;
        for(int i = 1 ; i < arr.length ;i++){
            sum += i*arr[i];
        }
        return sum;
    }
}
